from scrapy.crawler import CrawlerProcess
from scrapy.utils.project import get_project_settings

def main():
    print("开始爬取股票数据...")
    
    # 获取项目设置
    process = CrawlerProcess(get_project_settings())
    
    # 启动爬虫
    process.crawl('eastmoney')
    process.start()
    
    print("股票数据爬取完成！")

if __name__ == '__main__':
    main()